﻿using System.Reflection;
using log4net.Config;
using NUnit.Framework;

namespace Luna.Connectors.ZohoCRM.Test
{
    [TestFixture]
    public class TestBulkClient : AssertionHelper
    {
        [SetUp]
        public void SetUp()
        {
            var L_Stream = Assembly.GetExecutingAssembly().GetManifestResourceStream("Luna.Connectors.ZohoCRM.Test.log4net.config");
            XmlConfigurator.Configure(L_Stream);
            L_Stream.Dispose();
        }

        private string API_KEY = "1aead2f90b16476cc4eb3cf88f07996b";

        [Test]
        public void TestGet()
        {
            ZohoCrmClient L_Client = new ZohoCrmClient(API_KEY);
            ListOptions L_Options = new ListOptions();
            L_Options.FromIndex = 0;
            L_Options.ToIndex = 200;
            var L_Response = L_Client.GetRecords<ZohoAccount>(L_Options);
        }
    }
}